From c9a16ee02d3f278cb255b079d5d6701fc87d07f0 Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Wed, 1 Apr 2009 11:45:22 +0100 Subject: [PATCH] xend: Set close-on-exec flag for datagram sockets We need to close the socket on the child side when xend creates a child process such as qemu-dm. Signed-off-by: Yosuke Iwamatsu --- tools/python/xen/web/connection.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/python/xen/web/connection.py b/tools/python/xen/web/connection.py index e507323e91..3d335d2fbd 100644 --- a/tools/python/xen/web/connection.py +++ b/tools/python/xen/web/connection.py @@ -317,6 +317,8 @@ class SocketDgramListener: def main(self): try: + fcntl.fcntl(self.sock.fileno(), fcntl.F_SETFD, fcntl.FD_CLOEXEC) + while True: try: data = self.sock.recv(BUFFER_SIZE) -- 2.30.2